package cn.ml.chuji.oop.valueAndReference;

public class ValueTest1 {
    public static void main(String[] args) {
        ValueTest1 vt = new ValueTest1();

        int a = 1;
        System.out.println("初始化a的值为："+a);
        vt.change1(a);
        System.out.println("调用change111后a的值为："+a);
        a = vt.change2(a);
        System.out.println("调用change222后a的值为："+a);

    }
    public void change1(int x){
        x += 10;
    }

    public int change2(int x){
        x += 10;
        return x;
    }
}
